# Stencil for 404 error
class NotFoundStencil:
	def execute(self, gate):
		gate.setCode(404, 'Not Found')
		gate.writen('<div style="text-align: center">')
		gate.writen('<h1>404 NOT FOUND</h1>')
		gate.writen('<p>The requested resource %s was not found on this server.</p>' % gate.env.url)
		gate.writen('<i>%s, powered by %s</i>' % (gate.env.server_version, gate.env.sys_version))
		gate.writen('</div>')
		return True

# Stencil for 403 error
class PermissionDeniedStencil:
	def execute(self, gate):
		gate.setCode(403, 'Not Found')
		gate.writen('<div style="text-align: center">')
		gate.writen('<h1>403 FORBIDDEN</h1>')
		gate.writen('<p>You do not have permission to request %s.</p>' % gate.env.url)
		gate.writen('<i>%s, powered by %s</i>' % (gate.env.server_version, gate.env.sys_version))
		gate.writen('</div>')
		return True
